package com.jerei.crm.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

public class Contract implements Serializable {

    private static final long serialVersionUID = 2026427807815159167L;

    private Integer id;
    private Integer num;
    private String name;
    private Date start;
    private Date end;
    private int cid;
    private String insurancetype;
    private String insuranceproduct;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Contract contract = (Contract) o;
        return id.equals(contract.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getStart() {
        return start;
    }

    public void setStart(Date start) {
        this.start = start;
    }

    public Date getEnd() {
        return end;
    }

    public void setEnd(Date end) {
        this.end = end;
    }

    public int getCid() {
        return cid;
    }

    public void setCid(int cid) {
        this.cid = cid;
    }

    public String getInsurancetype() {
        return insurancetype;
    }

    public void setInsurancetype(String insurancetype) {
        this.insurancetype = insurancetype;
    }

    public String getInsuranceproduct() {
        return insuranceproduct;
    }

    public void setInsuranceproduct(String insuranceproduct) {
        this.insuranceproduct = insuranceproduct;
    }

    @Override
    public String toString() {
        return "contract{" +
                "id=" + id +
                ", num=" + num +
                ", name='" + name + '\'' +
                ", start=" + start +
                ", end=" + end +
                ", cid=" + cid +
                ", insurancetype='" + insurancetype + '\'' +
                ", insuranceproduct='" + insuranceproduct + '\'' +
                '}';
    }
}
